home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
6_10.lha
/
6_10
/
6_10cmp.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
485b
|
22 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
*
Compare the n LINT_type's pointed
to by l1 and l2. Return -1, 0 or 1
dependent on whether l1 is less than,
equal or greater than l2.
/
include <lint.h>
nt LINT_cmp(const LINT_type *l1, const LINT_type *l2,
int n)
if (l1 != l2)
while (--n >= 0)
if (*l1++ != *l2++)
return (l1[-1] > l2[-1] ? 1 : -1);
return (0);